package fatboy.test;

import java.io.File;

import junit.framework.Assert;

import org.junit.Test;

import fatboy.hypeerweb.Node;
import fatboy.tools.ProxyMaker;
import fatboy.hypeerweb.*;

public class testProxyMaker {
	/**
	 * try out proxy maker
	 */
	@Test
	public void test() {
		ProxyMaker.makeProxy(Node.class);
	}
	
	@Test
	public void testProxyNodeSourceFile() {
		File proxySourceFile = new File("./src/fatboy/hypeerweb/ProxyNode.java");
		Assert.assertTrue(proxySourceFile.exists());		
	}
	
	
	@Test
	public void testProxyNodeClassFile() {		
		File proxyClassFile = new File("./bin/fatboy/hypeerweb/ProxyNode.class");
		Assert.assertTrue(proxyClassFile.exists());		
	}
	
	/*
	@Test
	public void testProxyNodeClass() throws ClassNotFoundException {		
		ClassLoader loader = ClassLoader.getSystemClassLoader();
		Assert.assertNotNull(loader.getResource("./bin/fatboy/hypeerweb/ProxyNode.class"));
		
		Class.forName("ProxyNode", false, null);
		Class.forName("ProxyNode");
	}
	*/
	
}
